socket.io-client-dart
socket.io-client-dart copied to clipboard
emitWithAck pending forever
emitWithAck callback function pending forever if no response from server is there time out callback support? or extral arg for handle errors
Future emitChangeMessageStatus({@required String statuses}) async {
var c = Completer();
socket.emitWithAck("change_message_status", statuses, ack: (data) {
if(data!=null){
c.complete(data);
}else{
c.complete("Error !");
}
});
return await c.future;
}
c.complete("Error !"); Never invoke
I was having the same error.
https://github.com/rikulo/socket.io-client-dart/issues/147#issuecomment-770543188 helped in my case.