This commit is contained in:
wangcongtao
2020-01-07 21:04:56 +08:00
parent 75d699ed9a
commit 5799e932a6
3 changed files with 73 additions and 2 deletions

View File

@@ -31,7 +31,6 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
private static final String TAG = "SocketManager";
public static final int MSG_PRODUCT_LINE = MogoCommon.Product.mogoBussiness_VALUE;
private static final int MSG_HEADER_TYPE = MogoConnsvr.MsgType.mogoMsgTypeDispatchSvrNoRspReq_VALUE;
@@ -86,7 +85,7 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
Logger.d( TAG, "received msg type = %d", msgType );
IMogoOnMessageListener listener = mListeners.get( msgType );
if ( listener != null ) {
listener.onMsgReceived( GsonUtil.objectFromJson( payload.getPayload().toString(), listener.target() ) );
listener.onMsgReceived( GsonUtil.objectFromJson( payload.getPayload().toStringUtf8(), listener.target() ) );
}
} catch ( InvalidProtocolBufferException e ) {
Logger.e( TAG, "parse msg error.", e );