rikulo / socket.io-client-dart

socket.io-client-dart: Dartlang port of socket.io-client https://github.com/socketio/socket.io-client
https://quire.io
MIT License
675 stars 185 forks source link

error with timeout and emitWithAck #380

Open mfOryx opened 6 months ago

mfOryx commented 6 months ago

Hi, I have this on flutter:

_socket.timeout(5000).emitWithAck(event, data, ack: (dynamic result) { if (kDebugMode) { print('ack $result'); } if (result != null) { if (kDebugMode) { print('from server $result'); return result; } } else { if (kDebugMode) { print("Null"); } return null; } });

without the timeout, everything works fine. With the timeout, I receive this error: Unhandled Exception: type 'Null' is not a subtype of type 'bool'

jumperchen commented 1 month ago

any reproducible example? or please test with the latest 3.0.0-beta.4 version to give it a try.