Set readable cb for server
@@ -638,7 +638,11 @@ neat_dtls_connect(neat_ctx *ctx, neat_flow *flow)
// these will eventually be popped back onto the stack when dtls is setup
flow->operations->on_writable = neat_dtls_handshake;
+ if (flow->isServer) {
+ flow->operations->on_readable = neat_dtls_handshake;
+ } else {
flow->operations->on_readable = NULL;
+ }
flow->operations->on_connected = NULL;
neat_set_operations(ctx, flow, flow->operations);
